<template>
	<view>
		<view class="container">
			<view v-if="this.$store.state.hasLogin" @click="logout">
				退出登录
			</view>
			<view v-else @click="gotologin">
				登录/注册
			</view>
		</view>
		<page-tabpars></page-tabpars>
	</view>
</template>

<script>
	export default {
		data() {
			return {}
		},
		methods: {
			gotologin() {
				uni.navigateTo({
					url: '/pages/member/login/login'
				});
			},
			logout() {
				this.$store.commit('logout');
			}
		},
	}
</script>

<style lang="scss" scoped>
.container>*{
	text-align: center;
	margin: 22px;
}
</style>
